
/**
 * @description 
 * 菜单右上角代办角标
 * 一般在菜单组件加载或角色切换时调用
 */

import { todoCount } from '@/api/request/basic'
import store from '@/store'
const refreshMenuBadge = () => {
    todoCount().then(response => {
			const badges = response.body.data.item
			const menus = store.getters.menus
			menus.forEach(menu => {
			   menu.badge = badges[menu.beanId]
			});
			// store.dispatch('recordMenus', menus)
		})
}
export { refreshMenuBadge }